<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>GetJSONElement</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">GetJSONElement()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#006666"><b>GetJSONElement</b></font>(JSONValue, Index)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Return the JSON array element at the given 'Index' of a JSON value 
of <a href="jsontype.html">type</a> <font color="#924B72">#PB_JSON_Array</font>. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>JSONValue</i></td>
<td width="90%"> 
 
The JSON value. The value must be of type <font color="#924B72">#PB_JSON_Array</font>. 

 

</td></tr>
<tr><td><i>Index</i></td>
<td> 
 
The index of the array element to return. The index must be between 0 
and <a href="jsonarraysize.html">JSONArraySize()</a> - 1. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



The address of the JSON value at the specified array index. 
If the given 'Index' is out of range, the result is 0. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  ParseJSON</font>(0, "[1, 2, 3, 4, 5]")
    
  <b><font color="#006666">For</font></b> i = 0 <b><font color="#006666">To</font></b> <font color="#006666">JSONArraySize</font>(<font color="#006666">JSONValue</font>(0)) - 1
    <b><font color="#006666">Debug</font></b> <font color="#006666">GetJSONInteger</font>(<font color="#006666">GetJSONElement</font>(<font color="#006666">JSONValue</font>(0), i))
  <b><font color="#006666">Next</font></b> i
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="setjsonarray.html">SetJSONArray()</a>, <a href="addjsonelement.html">AddJSONElement()</a>, <a href="removejsonelement.html">RemoveJSONElement()</a>, <a href="resizejsonelements.html">ResizeJSONElements()</a>, 
<a href="clearjsonelements.html">ClearJSONElements()</a>, <a href="jsonarraysize.html">JSONArraySize()</a>, <a href="jsontype.html">JSONType()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=getjsondouble.html>GetJSONDouble()</a> - <a href=index.html>Json Index</a> - <a href=getjsonfloat.html>GetJSONFloat()</a> -&gt;



</body></html>